package cn.wolfcode.wolf2w.service;


import cn.wolfcode.wolf2w.domain.Travel;
import cn.wolfcode.wolf2w.domain.UserInfo;
import cn.wolfcode.wolf2w.query.TravelQuery;
import org.springframework.data.domain.Page;

import java.util.List;

/**
 * 游记服务接口
 */
public interface ITravelService {


    Travel get(String id);

    List<Travel> selectAll();

    Page<Travel> query(TravelQuery qo);

    void update(Travel travel);

    void save(Travel travel);

    void deleteById(String id);


    void changeState(String id, Integer state);

    String getContentById(String id);

    List<Travel> viewnumTop3(String destId);

    void saveOrUpdate(Travel travel, UserInfo userInfo);

    /**
     * 根据目的地名查攻略
     * @param keyword
     * @return
     */
    List<Travel> queryByDestName(String keyword);
}
